package com.huluobo.base.net;

import com.huluobo.base.bean.CommentBeanResult;
import com.huluobo.base.bean.CommonBeanResult;
import com.huluobo.base.bean.GiftBeanResult;
import com.huluobo.base.bean.UserBeanResult;
import com.huluobo.base.bean.VideoBeanResult;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by LC on 2024/8/31.
 */
public interface ApiService {
    @POST(Const.URL_LOGIN)
    Observable<UserBeanResult> login(@Body RequestBody body);

    @GET(Const.URL_VIDEOS)
    Observable<VideoBeanResult> getVideoList(@Query(Const.PARAM_CURRENT_PAGE) int currentPage,
                                             @Query(Const.PARAM_PAGE_SIZE) int pageSize);

    @POST(Const.URL_LIKE)
    Observable<CommonBeanResult> likeVideo(@Query(Const.PARAM_VIDEO_ID) int videoId);

    @POST(Const.URL_NO_LIKE)
    Observable<CommonBeanResult> noLikeVideo(@Query(Const.PARAM_VIDEO_ID) int videoId);

    @POST(Const.URL_FOLLOW)
    Observable<CommonBeanResult> followAuth(@Body RequestBody body);

    @GET(Const.URL_COMMENT)
    Observable<CommentBeanResult> getComment(@Query(Const.PARAM_VIDEO_ID) int videoId);

    @POST(Const.URL_SEND_COMMENT)
    Observable<CommentBeanResult> sendComment(@Body RequestBody body);

    @POST(Const.URL_CANCEL_FOLLOW)
    Observable<CommonBeanResult> cancelFollow(@Body RequestBody body);

    @GET(Const.URL_GIFT)
    Observable<GiftBeanResult> getGift();
}
